package ar.edu.itba.it.cg.grupo01.impl.texture;

import java.awt.Color;
import java.awt.image.BufferedImage;

import ar.edu.itba.it.cg.grupo01.api.texture.TextureFilter;

public class defaultTextureFilter implements TextureFilter {

	@Override
	public Color getTextureColor(float u, float v, BufferedImage img) {
			try{
				Color col=new Color(img.getRGB((int) Math.floor( u*img.getWidth()), (int) Math.floor(v*img.getHeight()) ) );
			}catch(java.lang.ArrayIndexOutOfBoundsException e){
				System.out.println("asd");
			}
			
		return new Color(img.getRGB((int) Math.floor( u*img.getWidth()), (int) Math.floor(v*img.getHeight()) ) );
		
	}

}
